<%-- 
    Document   : menu
    Created on : 21-dic-2012, 15:29:29
    Author     : mruiz
--%>

<%@page import="com.gr.uth.dao.UserDAO"%>
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>

            <div class="nav-collapse collapse">
                <ul class="nav">
                    <li class="active"><a href="#">Home</a></li>
                    <li><a href="#about">About</a></li>
                    <li><a href="#contact">Contact</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="#">Action</a></li>
                            <li><a href="#">Another action</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li class="divider"></li>
                            <li class="nav-header">Nav header</li>
                            <li><a href="#">Separated link</a></li>
                            <li><a href="#">One more separated link</a></li>
                        </ul>
                    </li>
                </ul>
                <%
                    UserDAO u = (UserDAO) session.getAttribute("userSession");
                    if (u != null) {

                %><div id="session_info"><form class="navbar-form pull-right" method="POST" action="sign/logout.jsp">
                        <%=u.getEmail()%>
                        <input type="submit" name="submit" class="btn" value="Log out">
                    </form></div>
                    <%
                } else {%>

                <form class="navbar-form pull-right" method="POST" action="sign/login.jsp">
                    <input class="span2" type="text" name="login_username" placeholder="Email">
                    <input class="span2" type="password" name="login_password" placeholder="Password">
                    <input type="submit" name="submit" class="btn" value="Sign in">
                </form>
                <%   }
                %>
            </div><!--/.nav-collapse -->
        </div>
    </div>
</div>